#!/usr/bin/python
# -*- coding: utf-8 -*-


from jiaju.common.bottle.persistable import Persistable
from jiaju.common.db import connection


def ensure_success(input_function):
    print input_function.func_name
    def replace_function(*args, **kwargs):
        while True:
            try:
                return input_function(*args, **kwargs)
            except:
                raise "exception"
                
    replace_function.func_name = "picc"
    replace_function.__doc__ = input_function.__doc__
    return replace_function

@ensure_success
def test():
    print "yes"
    
if __name__ == '__main__':
    
        